#include "types.h"
#include "stat.h"
#include "user.h"

void f();

void f()
{
	printf(1,"f called\n");
}

int main(void)
{
  printf(1,"calling f\n");
  f();
  char *F=(char*)f;
  F=F+0x15;
  printf(1,"MEM of f:%x\n",*F);
  printf(1,"calling f\n");
  f();
  int pid = fork();
  if(pid!=0)
	wait();
  printf(1,"writing to MEM of f\n");
  *F++=0x90;
  *F++=0x90;
  *F++=0x90;
  *F++=0x90;
  *F++=0x90;
  F=F-5;
  printf(1,"MEM of f:%x\n",*F);
  printf(1,"calling f\n");
  f();
  exit();
}
